<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
<meta charset="utf-8">
<title>登录注册 - 学生宿舍管理系统</title>
<link rel="shortcut icon" href="/img/head.jpg" type="image/x-icon">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/layui/css/layui.css">
<script src="/layui/layui.js"></script>
<script src="/js/jquery-3.6.0.min.js"></script>
</head>

<body >
    <div class="content">
        <div class="form sign-in">
            <h2>学生宿舍管理系统</h2>
            <form class="layui-form" method="post" action="/user/login">
            <label>
                <span>账号</span>
                <input type="text" name="username" id="username"/>
            </label>
            <label>
                <span>密码</span>
                <input type="password" name="password" id="password"/>
            </label>
            <p class="forgot-pass" onclick="forget_password()"><a href="javascript:">忘记密码？</a></p>
			
			<!-- layui插入 -->
			
			  <div class="layui-form-item" style="margin-left: 40px;">
			    <div class="layui-input-block">
				<input type="radio" name="people" value="0" title="学生" checked>
				<input type="radio" name="people" value="1" title="宿舍管理员" >
				<input type="radio" name="people" value="2" title="辅导员">
			    </div>
			    <center>
            		<input type="submit" value="登录" class="submit" />
            		<button type="button" class="fb-btn" onclick="userphonelogin()">使用 <span>手机号码</span> 登录</button>
				</center>
                  <span style="color:red" th:text="${msg}"></span>
			  </div>
			</form>
        </div>
        <div class="sub-cont">
            <div class="img" >
                <div class="img__text m--up">
                    <h2>还未注册？</h2>
                    <p>立即注册！</p>
                </div>
                <div class="img__text m--in">
                    <h2>已有帐号？</h2>
                    <p>有帐号就登录吧，好久不见了！</p>
                </div>
                <div class="img__btn">
                    <span class="m--up">注 册</span>
                    <span class="m--in" onclick="login();">登 录</span>
                </div>
            </div>
            <div class="form sign-up">
                <h2>立即注册</h2>
                <form action="/user/regist" method="post">
                    <label>
                        <span>用户名</span>
                        <input type="text" name="register_username" id="register_username"/>
                    </label>
                    <label>
                        <span>电话</span>
                        <input type="text" name="register_tel" id="register_tel"/>
                    </label>
                    <label>
                        <span>密码</span>
                        <input type="password" name="register_password" id="register_password"/>
                    </label>
                    <center>
                        <input type="submit" value="注册" class="submit"  />
                        <button type="button" class="fb-btn" onclick="userphonelogin()">使用 <span>手机号码</span> 注册</button>
                    </center>
                </form>
            </div>
        </div>
    </div>
	
	<!-- 注册与登录的跳转与事件处理 -->
    <script src="/js/home-script.js"></script>
	
	
	
</body>

</html>